import ajax from "./ajax"
// console.log(ajax);

//http://www.hg-zn.com:9527/api/visual/visual_seckill?id=28
export const getSeckillApi = (params) => ajax("/api/visual/visual_seckill", params)
export const getHomeListApi = (params) => ajax("/api/goods/type_list", params)
export const getHomeCateListApi = (params) => ajax("/api/visual/visual_second_category", params)

export const getHomeGoodsListApi = (params) => ajax("/api/catalog/goodslist", params, "post")

//分类页面--左侧数据
export const getCategoryLeftListApi = () => ajax("/api/catalog/list")

//分类页面--右侧数据
export const getCategoryRightListApi = (cat_id) => ajax("/api/catalog/list/" + cat_id)

//商品详情
export const getGoodsDetailApi = (params) => {
    return ajax("/api/goods/show", params, "post")
}

//用户登录
export const getUserLoginApi = (url, params, type) => {
    return ajax(url, params, type)
}